package org.third.security.random;

import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;

public class RandomTest {
    public static void main(String[] args) throws NoSuchAlgorithmException {

        while (true) {
            long start = System.currentTimeMillis();
            SecureRandom secureRandom = SecureRandom.getInstance("SHA1PRNG");
            secureRandom.generateSeed(20);
            byte[] salt = new byte[20];
            secureRandom.nextBytes(salt);
            long end = System.currentTimeMillis();
            System.out.println("time: " + (end - start));
        }

    }

}
